<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
	<title>可用可信家庭市场</title>
	<!--                       CSS                       -->
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="/static/css/reset.css" type="text/css" media="screen" />
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="/static/css/style.css" type="text/css" media="screen" />
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="/static/css/invalid.css" type="text/css" media="screen" />
	<!--                       Javascripts                       -->
	<!-- jQuery -->
	<script type="text/javascript" src="/static/scripts/jquery-1.3.2.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="/static/scripts/simpla.jquery.configuration.js"></script>
	<!-- Facebox jQuery Plugin -->
	<script type="text/javascript" src="/static/scripts/facebox.js"></script>
	<!-- jQuery WYSIWYG Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.wysiwyg.js"></script>
	<!-- jQuery Datepicker Plugin -->
	<script type="text/javascript" src="/static/scripts/jquery.datePicker.js"></script>
	<script type="text/javascript" src="/static/scripts/jquery.date.js"></script>

	<!-- jQuery -->
	<script src="bower_components/jquery/jquery.min.js"></script>
	<link rel="stylesheet" type="text/css" media="all" href="/static/css/motai.css">
	<script type="text/javascript" src="/static/js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" charset="utf-8" src="/static/js/jquery.leanModal.min.js"></script>
	<script type="text/javascript" src="/static/scripts/motai.js"></script>
	<style>
		body{
			font-family:黑体;
		}

		.dashboard-tile.tile-red {
			background-color: #e84c3d;
			color: #fff;
			height:110px;
			width:300px;
		}
		.dashboard-tile.tile-turquoise {
			background-color: #1abc9c;
			color: #fff;
			height:110px;
			width:300px;
		}
		.dashboard-tile.tile-purple {
			background-color: #9a59b5;
			color: #fff;
			height:110px;
			width:300px;
		}
		.dashboard-tile {
			background-color: #fff;
			color: #555;
			margin-bottom: 15px;
			padding: 10px;
			-webkit-border-radius: 3px;
			-moz-border-radius: 3px;
			-ms-border-radius: 3px;
			-o-border-radius: 3px;
			border-radius: 3px;
		}
		.big{
			width:350px;
			height:140px;
			float:left;
		}
		.text-left {
			text-align: left;
		}

		#cgmain {width:1000px;background-color:#d9edf7;text-align:center;}
		#cgmain .cgdiv {margin-bottom:0px;}
		.table-b {width:980px;border-width: 1px;
			border-color: #a9c6c9;
			border-collapse: collapse;margin-left:10px;font-size:15px;}
		.table-b th{
			border-width: 1px;
			padding: 8px;
			border-style: solid;
			border-color: #8F8F8F;
		}
		.table-b td{
			border-width: 1px;
			padding: 8px;
			border-style: solid;
			border-color: #8F8F8F;
		}

	</style>
</head>
<body>
<div id="body-wrapper">
	<!-- Wrapper for the radial gradient background -->
	<div id="sidebar">
		<div id="sidebar-wrapper">

			<div id="profile-links">
				<!-- Logo (221px wide) -->
				<a href="#"><img id="logo" src="/static/images/logo.png" alt="Simpla Admin logo" /></a>

				{$_COOKIE['user_name']},你好 <br/>
				| <a href="#" title="Sign Out">退出</a> </div>

			 <ul id="main-nav">
                <!-- Accordion Menu -->
                <!--<li> <a href="#/" class="nav-top-item no-submenu">-->
                    <!--&lt;!&ndash; Add the class "no-submenu" to menu items with no sub menu &ndash;&gt;-->
                    <!--Dashboard </a> </li>-->
               {if condition="!empty($powers['order_action'])"}
                <li> <a href="#" class="nav-top-item current"> 订单操作</a>
                    <ul>
                    	
                        <li><a href="/index.php/index/index/neworder_list">新订单</a></li>
                        <!-- Add class "current" to sub menu items also -->
                        <li><a  class="current" href="/index.php/index/index/addorder">创建新订单</a></li>
                        <li><a href="/index.php/index/index/allorder_list">所有订单</a></li>
                    </ul>
                </li>
           	{/if}
           	 {if condition="!empty($powers['cg_action'])"}
                <li> <a href="#" class="nav-top-item"> 采购单 </a>
                    <ul>
                        <li><a href="/index.php/index/index/newcg_list">待处理 采购单</a></li>
                        <li><a href="/index.php/index/index/cg_history">采购单历史</a></li>
                    </ul>
                </li>
             {/if}
              {if condition="!empty($powers['table_action'])"}
                <li> <a href="#" class="nav-top-item"> 报表 </a>
                    <ul>
                        <li><a href="/index.php/index/biao/daybiao">日报表</a></li>
                        <li><a href="/index.php/index/biao/yuebiao">月报表</a></li>
                        <li><a href="/index.php/index/biao/nianbiao">年报表</a></li>
                    </ul>
                </li>
               {/if}
                {if condition="!empty($powers['goods_action'])"}
                <li> <a href="#" class="nav-top-item">菜品管理 </a>
                    <ul>
                        <li><a href="/index.php/index/goods/goods">所有菜品</a></li>
                        <li><a href="/index.php/index/goods/categorys">所有分类</a></li>
                    </ul>
                </li>
                {/if}
                 {if condition="!empty($powers['promotion_action'])"}
                 <li> <a href="#" class="nav-top-item"> 推广活动 </a>
                    <ul>
                        <li><a href="/index.php/index/promotion/snlist">SN优惠码</a></li>
                    </ul>
                </li>
                {/if}
                
                <li> <a href="#" class="nav-top-item"> 个人信息 </a>
                    <ul>
                        <li><a href="/index.php/index/index/user_info">查看信息</a></li>
                        <li><a href="/index.php/index/index/update_pass">修改密码</a></li>
                    </ul>
                </li>
       
                {if condition="!empty($powers['super'])"}
                 <li><a href="#" class="nav-top-item"> 用户管理 </a>
                 	<ul>
                        <li><a href="/index.php/index/admin/user_admin">用户权限</a></li>
                    </ul>
                 </li>
                {/if}

            </ul>
            <!-- End #main-nav -->
		</div>
	</div>
	<!-- End #sidebar -->
	<div id="main-content">
		<!-- Main Content Section with everything -->
		<noscript>
			<!-- Show a notification if the user has disabled javascript -->
			<div class="notification error png_bg">
				<div> Javascript is disabled or is not supported by your browser. Please <a href="http://browsehappy.com/" title="Upgrade to a better browser">upgrade</a> your browser or <a href="http://www.google.com/support/bin/answer.py?answer=23852" title="Enable Javascript in your browser">enable</a> Javascript to navigate the interface properly.
					Download From <a href="http://www.exet.tk">exet.tk</a></div>
			</div>
		</noscript>
		<!-- Page Head -->
		<h4 style="font-family: 微软雅黑">新订单待处理</h4>
		
		<!-- End .shortcut-buttons-set -->
		<div class="clear"></div>
		<!-- End .clear -->
		<div class="content-box">
			<!-- Start Content Box -->
			<div class="content-box-header">
				<h3><a href="javascript:history.back()"> 《返回&nbsp;&nbsp;&nbsp;&nbsp;		</a></h3>
				
			</div>
			<!-- End .content-box-header -->
			<div class="content-box-content">
				{if(!empty($order_number))}
				<form method="post" action="/index.php/index/index/addorder2">
					
						<input type="hidden" name="order_number" value="{$order_number}" />
						<!--startprint-->
						<div id="cgmain">
							<div class="cgdiv">
								<p style="text-align:center;margin-bottom:0px;"><font style="font-size:20px;font-weight:bold;text-align:center;">创建新订单</font></p>
							可用可信家庭市场
								&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
								订单号：&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
								配送日期
								<select id="doc-select-1" name="ps_date">
									<option value="1">今天</option>
									<option value="2">明天</option>
									<option value="3">后天</option>
								</select>

								&nbsp; &nbsp;

								<select id="doc-select-2" name="ps_time">
									<option value="9">9:00-10:00</option>
									<option value="10">10:00-11:00</option>
									<option value="11">11:00-12:00</option>
									<option value="15">15:00-16:00</option>
									<option value="16">16:00-17:00</option>
									<option value="17">17:00-18:00</option>
								</select>

							</div>
							<table  class="table-b" cellpadding="0" cellspacing="0">
								<thead>
								<tr>
									<th style="width:100px;">菜单名</th>
									<th style="width:50px;">标价</th>
									<th style="width:60px;">规格</th>
									<th style="width:50px;">数量</th>
									<th style="width:80px;">优惠明细</th>
									<th style="width:100px;">备注</th>
									<th style="width:100px;">操作</th>
								</tr>
								</thead>
								<tbody>

								<tr>
									<td colspan="7">
										<button type="button" onclick="add({$order_number})"class="am-btn am-btn-green" data-am-modal="{target: '#doc-modal-2', closeViaDimmer: 0, width: 400, height: 300}">添加新菜品</button>
									</td>
								</tr>

								<tr>
									<td class="td" colspan="3">
										<br/><br/><br/>
										收&nbsp;货&nbsp;人：<input type="text" name="infoname" value=""/><br/>
										联系电话：<input type="text" name="infophone" value=""/> <br/>
										收货地址：<input type="text" style="width:300px;" name="infoaddress" value=""/><br/>
									</td>
									<td  class="td" colspan="4">
										顾客备注：
										<textarea name="desc" style="width:300px;height:40px;"></textarea><br/>
										商家备注：
										<textarea name="store_desc" style="width:300px;height:40px;"></textarea>
									</td>
								</tr>

								</tbody>
							</table>



							<font style="margin-left:10px;float:left;">
								原价: <input type="text" name="price" value="" style="width:70px;"/> ￥&nbsp; &nbsp; &nbsp;
								应收: <input type="text" name="discount_price" value="" style="width:70px;"/> ￥&nbsp; &nbsp; &nbsp;
								实收: <input type="text" name="online_pay" value="" style="width:70px;"/> 
							</font>
							&nbsp; &nbsp;
							配送员：    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
							客户签名: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
							<br />
							<br />

							<div style="text-align:center;" ><button type="submit" class="button medium back">提交</button><font style="color:green;">创建订单，并加入采购单</font></div>
						</div>
						<!--endprint-->

					</form>
				
				{else/}
				
					<form method="post" action="/index.php/index/index/addorder2">
					
						<input type="hidden" name="order_id" value="{$order.order_id}" />
						<!--startprint-->
						<div id="cgmain">
							<div class="cgdiv">
								<p style="text-align:center;margin-bottom:0px;"><font style="font-size:20px;font-weight:bold;text-align:center;">创建新订单</font></p>
							可用可信家庭市场
								&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
								订单号：{$order.order_id}&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;
								配送日期
								<select id="doc-select-1" name="ps_date">
									<option value="1">今天</option>
									<option value="2">明天</option>
									<option value="3">后天</option>
								</select>

								&nbsp; &nbsp;

								<select id="doc-select-2" name="ps_time">
									<option value="9">9:00-10:00</option>
									<option value="10">10:00-11:00</option>
									<option value="11">11:00-12:00</option>
									<option value="15">15:00-16:00</option>
									<option value="16">16:00-17:00</option>
									<option value="17">17:00-18:00</option>
								</select>

							</div>
							<table  class="table-b" cellpadding="0" cellspacing="0">
								<thead>
								<tr>
									<th style="width:100px;">菜单名</th>
									<th style="width:50px;">标价</th>
									<th style="width:60px;">规格</th>
									<th style="width:50px;">数量</th>
									<th style="width:80px;">优惠明细</th>
									<th style="width:100px;">备注</th>
									<th style="width:100px;">操作</th>
								</tr>
								</thead>
								<tbody>

								{volist name="menu" id="vo" key="kk" }

								<tr	id="goods_id"  onmouseover="this.style.backgroundColor='#b9df70';" onmouseout="this.style.backgroundColor='#d9edf7';">

									<td class="td">
										{$vo.name}<input type="hidden" name="{$vo.goods_id}name" value="{$vo.name}" size="6"/>
									</td>
									<td class="td"><input type="text" name="{$vo.goods_id}price" value="{$vo.price}" size="6"/></td>
									<td class="td">
										{$vo.guige}<input type="hidden" name="{$vo.goods_id}guige" value="{$vo.guige}" size="6"/>

									</td>
									<td class="td"><input type="text" name="{$vo.goods_id}" value="{$vo.num}" size="6"/></td>
									<td class="td">

										{if condition="!empty($v['discount_detail'])"}
										{$v['discount_detail']->desc}&nbsp;{$v['discount_detail']->discount_money}
										{/if}
									</td>
									<td class="td">
										<input type="text" name="{$vo.goods_id}desc" value="" size="20"/>
									</td>

									<td class="td">
										<button type="button" onclick="del({$order.order_id},{$vo.goods_id})"class="am-btn am-btn-primary" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0, width: 400, height: 150}">删除</button>
									</td>
									{/volist}
								</tr>
								<tr>
									<td colspan="7">
										<button type="button" onclick="add({$order.order_id})"class="am-btn am-btn-green" data-am-modal="{target: '#doc-modal-2', closeViaDimmer: 0, width: 400, height: 300}">添加新菜品</button>
									</td>
								</tr>

								<tr>
									<td class="td" colspan="3">
										<br/><br/><br/>
										收&nbsp;货&nbsp;人：<input type="text" name="infoname" value="{$infoname}"/><br/>
										联系电话：<input type="text" name="infophone" value="{$infophone}"/> <br/>
										收货地址：<input type="text" style="width:300px;" name="infoaddress" value="{$infoaddress}"/><br/>
									</td>
									<td  class="td" colspan="4">
										顾客备注：
										<textarea name="desc" style="width:300px;height:40px;">{$order.desc}</textarea><br/>
										商家备注：
										<textarea name="store_desc" style="width:300px;height:40px;">{$order.store_desc}</textarea>
									</td>
								</tr>

								</tbody>
							</table>



							<font style="margin-left:10px;float:left;">
								原价: <input type="text" name="price" value="{$order.price}" style="width:70px;"/> ￥&nbsp; &nbsp; &nbsp;
								应收: <input type="text" name="discount_price" value="{$order.discount_price}" style="width:70px;"/> ￥&nbsp; &nbsp; &nbsp;
								实收: <input type="text" name="online_pay" value="{$order.online_pay}" style="width:70px;"/> 
							</font>
							&nbsp; &nbsp;
							配送员：    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;
							客户签名: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
							<br />
							<br />

							<div style="text-align:center;" ><button type="submit" class="am-btn am-btn-green">提交</button></div>
						</div>
						<!--endprint-->

					</form>
				{/if}
					
			
			</div>
				<!-- End #tab1 -->

			</div>
			<!-- End .content-box-content -->
		</div>
		<!-- End .content-box -->



	</div>
	<!-- End #main-content -->
</div>
<script src="http://cdn.bootcss.com/jquery/3.1.0/jquery.min.js"></script>
<script src="http://cdn.bootcss.com/amazeui/2.7.2/js/amazeui.min.js"></script>
<script>
	function smallname(value){
		alert(value);
		$.get("/index.php/index/index/option", function(data){

		},'json');
	}

	function add(order_id)
	{
		$('#add_id').val(order_id);
	}
	function del(order_id,goods_id)
	{
		$('#del_id').val(order_id);
		$('#gid').val(goods_id);
	}
	

</script>

<!-- won模态框（Modal） -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1" style="display:none;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">你确定删除该菜品吗？
			<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		</div>
		<form method="post" action="/index.php/index/index/addcg_delgood">
			<input type="hidden" name="order_id" value="" id="del_id" />
			<input type="hidden" name="goods_id" value="" id="gid" />
			<input type="hidden" name="status" value="addorder" />
			<br />
			<button type="submit" class="am-btn-green">
				确定
			</button>

		</form>
	</div>
</div>
<!-- won模态框（Modal） -->
<!-- won模态框（Modal） -->
<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-2" style="display:none;">
	<div class="am-modal-dialog">
		<div class="am-modal-hd">添加菜品
			<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
		</div>
		<form method="post" action="/index.php/index/index/addorder_addgood">
			<input type="hidden" name="order_id" value="" id="add_id" />
			<input type="hidden" name="status" value="addorder" />
			菜名:
			<input type="text" name="name" value="" /><br/>
			单价:
			<input type="text" name="price" value="" /><br/>
			规格:
			<input type="text" name="guige" value="斤" /><br/>
			数量:
			<input type="text" name="num" value="" /><br/>
			<br />
			<button type="submit" class="am-btn-green">
				&nbsp;提 交&nbsp;
			</button>

		</form>
	</div>
</div>
<!-- won模态框（Modal） -->


</body>
</html>



</body>
</html>
